function [X, y] = parseData(rawData)

% parses raw data into appropriate format for ML training/validation
%
% Input: rawData structure returned from readData()
%
% Output: table X with input data points (one per row) of nine indicators
%         and expanded set of variables. 
%         column vector y of class labels (plus10)
%
% change assignments if input data format is altered

rbf_type = categorical(rawData{:,2} > 0);
district = categorical(rawData{:,1});

opd_ts = rawData{:,4};
deliveries_ts = rawData{:,5};
anc_ts = rawData{:,6};
postnatal_ts = rawData{:,7};
immunization_ts = rawData{:,8};
ipt_ts = rawData{:,9};
fpmethods_ts = rawData{:,10};
counselling_ts = rawData{:,11};
exposedbabies_ts = rawData{:,12};

opd_hia = rawData{:,13};
deliveries_hia = rawData{:,14};
anc_hia = rawData{:,15};
postnatal_hia = rawData{:,16};
immunization_hia = rawData{:,17};
ipt_hia = rawData{:,18};
fpmethods_hia = rawData{:,19};
counselling_hia = rawData{:,20};
exposedbabies_hia = rawData{:,21};

plus10 = rawData{:,22};

q6 = rawData{:,23};
q7 = rawData{:,24};
q8 = rawData{:,25};
q9 = rawData{:,26};
est = rawData{:,27}; 
fil = rawData{:,28};

X = table(rbf_type, district, opd_ts, deliveries_ts, anc_ts, ...
    postnatal_ts, immunization_ts, ipt_ts, fpmethods_ts, ...
    counselling_ts, exposedbabies_ts, opd_hia, deliveries_hia, ...
    anc_hia, postnatal_hia, immunization_hia, ipt_hia, fpmethods_hia, ...
    counselling_hia, exposedbabies_hia, q6, q7, q8, q9, est, fil);

y = plus10;

end